package cqrtplm.service;

import com.github.pagehelper.PageInfo;
import com.hustcad.plm.pdm.common.model.vo.search.ResultEntityVO;
import com.hustcad.plm.pdm.common.model.vo.search.SearchAttributeVO;
import com.ty.basic.entity.IdentifierEntity;
import cqrtplm.dto.UserQueryDTO;

import javax.servlet.http.HttpServletResponse;
import java.math.BigInteger;
import java.util.List;
import java.util.Set;

public interface QueryPartService {

    /**
     * 根据类型分页查询
     *
     * @param queryPartIFDTO
     * @return
     */
    PageInfo<ResultEntityVO> queryPartData(UserQueryDTO queryPartIFDTO, boolean needThumbnailFile);

    /**
     * 根据类型分页查询
     *
     * @param queryPartIFDTO
     * @param needThumbnailFile
     * @param needIBA
     * @return
     */
    PageInfo<ResultEntityVO> queryPartData(UserQueryDTO queryPartIFDTO,  boolean needThumbnailFile, boolean needIBA);

    /**
     * 根据类型查询iba
     *
     * @param type
     * @return
     */
    List<SearchAttributeVO> getIbaByTypeName(String type);


    void autoCollectPart(BigInteger workFlowContainerId);


    /**
     * 根据类型分页查询
     *
     * @param queryPartIFDTO
     * @return
     */
    Set<String> queryPartAndIbaByType(UserQueryDTO queryPartIFDTO);

    /**
     * 物料变更履历查询
     *
     * @param identifierEntity
     * @return
     */
    List<ResultEntityVO> getVersionHistory(IdentifierEntity identifierEntity);


    /**
     * 导出查询结果
     * @param queryPartIFDTO
     * @param response
     */
    void exportPartDataFile( UserQueryDTO queryPartIFDTO, HttpServletResponse response);


}
